<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
		<style type="text/css">
			body {
				background-color: black;
			}
			.container {
				/*居中*/
				margin: auto;
				border: 1px solid black;
				width: 850px;
			}
			img {
				width: 850px;
			}
		</style>
		<script>
			onload = function () {
				setInterval(changeImg,2000);
            }
            let i = 0;
            function changeImg() {
                i++;
                let imgEle = document.getElementById("imgId");
                imgEle.src = "../img/"+i+".jpg";
				if(i === 4){
				    i = -1;
				}
            }
		</script>
	</head>
	<body>
		<div class="container">
			<img src="../img/0.jpg" id="imgId">
		</div>
	</body>
</html>
